home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / thor / edge / asciipic.edge next >
Text File  |  1996-11-10  |  845b  |  35 lines

  1. /* ASCIIPic.edge
  2. ** $VER: ASCIIPic.edge v1.1    (11.01.96)
  3. ** Original script by Troels Walsted Hansen
  4. ** Convert picture to ASCII and include it in EDGE. Uses
  5. ** 'ilbm2ascii' v1.4 by Tobias Ferber.
  6. */
  7.  
  8. options results
  9.  
  10. /* needs EDGE functions */
  11.  
  12. if(substr(address(),1,4) ~= "EDGE") then
  13. do
  14.     say "This script should only be started from inside EDGE."
  15.     exit 20
  16. end
  17. else edgeport = address()
  18.  
  19. /* request a filename, convert to ascii and include in EDGE */
  20.  
  21. address(edgeport)
  22. REQUESTFILE title '"Select ILBM to convert and include:"'PATH '"SD0:"'
  23. picfile=result
  24. if(rc ~= 0) then exit
  25.  
  26. lastchar = right(picfile,1)
  27. if(rc ~= 0 | lastchar = "/" | lastchar = ":" | picfile = "") then exit
  28.  
  29. address command "run >nil: ilbm2ascii "||'"'picfile'"'||" >t:EDGEASCIIPicture"
  30.  
  31. INCLUDE "t:EDGEASCIIPicture"
  32.  
  33. address command "delete >nil: t:EDGEASCIIPicture"
  34. exit
  35.